#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
int main()
{
	int arr[] = { 0,1,2,3,4,6,5 };
	int n = sizeof(arr) / sizeof(arr[0]);
	int i = 0;
	for (i = 0;i < n - 1;i++)
	{
		int j = 0;
		int flag = 1;
		int temp = 0;
		for (j = 0;j < n - 1 - i;j++)
		{
			if (arr[j] > arr[j + 1])
			{
				temp = arr[j];
				arr[j] = arr[j + 1];
				arr[j + 1] = temp;
				flag = 0;
			}
		}
		if (flag == 1)
			break;
	}
	for (i = 0;i < n;i++)
		printf("%d ", arr[i]);
}